package com.competition.param.impl;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import com.admin.param.contract.IRegionAddParam;
import com.competition.web.constant.ValidateCondtionAndMessage;

public class RegionAddParam implements IRegionAddParam {// 上级id
	@NotNull
	@Min(value = ValidateCondtionAndMessage.MIN_ID, message = ValidateCondtionAndMessage.MIN_ID_MSG)
	private Integer parentid;
// 名称
	@NotNull
	@Pattern(regexp = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION, message = ValidateCondtionAndMessage.CHINESE_ENGLISH_NUMBER_UNDERLINE_BY_SERIESDESCRIPTION_MSG)
	private String name;
// 类型
	@NotNull
	@Min(value = ValidateCondtionAndMessage.MIN_STATUS, message = ValidateCondtionAndMessage.MIN_STATUS_MSG)
	@Max(value = ValidateCondtionAndMessage.MAX_STATUS, message = ValidateCondtionAndMessage.MAX_STATUS_MSG)
	private Byte type;
// 排序
	@NotNull
	@Min(value = ValidateCondtionAndMessage.MIN_ID, message = ValidateCondtionAndMessage.MIN_ID_MSG)
	private Integer displayorder;

	public Integer getParentid() {
		return parentid;
	}

	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	public Byte getType() {
		return type;
	}

	public void setType(Byte type) {
		this.type = type;
	}

	public Integer getDisplayorder() {
		return displayorder;
	}

	public void setDisplayorder(Integer displayorder) {
		this.displayorder = displayorder;
	}
}